import '@ant-design/v5-patch-for-react-19';
import './styles/index.less';
import { StrictMode } from 'react';
import { MainModal } from '../../../packages/@hdtd/components/src/index';
// import { MainModal } from '@hdtd/components/test';
import { RouterProvider } from 'react-router';
import { createRoot } from 'react-dom/client';
import { message } from 'antd';
import router from './router';
import { tryApiRequest } from '@hdtd/utils';

tryApiRequest.setCtx({
  messageApi: {
    error: message.error,
    success: message.success
  }
});
createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <MainModal>
      <RouterProvider router={router} />
    </MainModal>
  </StrictMode>
);
